package IOxuliehua;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) {
        person son = new person("马冬梅",29,"女",new String[]{"演员","住在翻斗花园"});
        {
            try {
                FileOutputStream file = new FileOutputStream("person.obj");
                ObjectOutputStream oos = new ObjectOutputStream(file);
                oos.writeObject(son);
                System.out.println("对象已写出");
                oos.close();
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
